package com.wxproject.demo.Common.MyException;

import com.wxproject.demo.Common.exception.ResultEnum;

/**
 * @author zqf
 * @date 2021/3/31 23:13
 * @description
 */
public class BusinessException extends RuntimeException {

    private int code;

    private String errMsg;

    public BusinessException(ResultEnum resultEnum){
        this.code = resultEnum.getCode();
        this.errMsg = resultEnum.getMsg();
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getErrMsg() {
        return errMsg;
    }

    public void setErrMsg(String errMsg) {
        this.errMsg = errMsg;
    }
}